(function() {/* Copyright 2022 Glance Networks, Inc. */ function k(a,...c){!window.console||!window.console[a]||window.GLANCE_COBROWSE&&window.GLANCE_COBROWSE.disableLogging||(c=c.map(b=>{if("object"===typeof b)try{b=JSON.stringify(b)}catch(f){console.error(f),b="unable to convert object to string"}return"string"===typeof b?b.replace(/[\r\n]/g," ").replace("<","<"):b}),window.console[a](...c))}function m(...a){k("log",...a)}function n(...a){m("DEBUG:",...a)};/* Copyright (c) 2022 Glance Networks, Inc. */ window.GLANCE=window.GLANCE||{};window.GLANCE.VERSION="6.5.0.28";window.GLANCE.PATCH="";window.GLANCE.Lib=window.GLANCE.Lib||{}; var x=function(){var a=navigator.userAgent.toLowerCase(),c=navigator.platform.toLowerCase(),b=a.match(/(edge|edg)[\s\/:]([\w\d\.]+)?/)||a.match(/(opera|ie|firefox|chrome|crios|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/)||a.match(/(rv):([\w\d\.]+)/)||[null,"unknown",0];"edg"===b[1]&&(b[1]="edge");"crios"===b[1]?b[1]="chrome":"rv"===b[1]&&(b[1]="ie");a={extend:Function.prototype.extend,name:"version"==b[1]?b[3]:b[1],version:"ie"==b[1]&&document.documentMode||parseFloat("opera"== b[1]&&b[4]?b[4]:b[2]),l:{name:a.match(/ip(?:ad|od|hone)/)||c.match(/mac/)&&"undefined"!==typeof navigator.g?"ios":(a.match(/(?:webos|android)/)||c.match(/mac|win|linux/)||["other"])[0]},F:{K:!!document.evaluate,H:!!window.J,query:!!document.querySelector,json:!!window.JSON},G:{},I:function(){return"ios"==this.l.name||"android"==this.l.name}};document.documentMode&&window.XDomainRequest?(a.name="ie",a.version=document.documentMode):window.navigator&&navigator.appVersion&&-1!=navigator.appVersion.indexOf("MSIE 7.")&& (a.name="ie",a.version="7");a[a.name]=!0;a[a.name+parseInt(a.version,10)]=!0;a.l[a.l.name]=!0;return a}();function z(a,c){if(Array.isArray(a))return(new c.Array(...a)).map(b=>z(b,c));if(null!==a&&"object"===typeof a){const b={};Object.entries(a).forEach(([f,h])=>b[f]=z(h,c));return b}return a}if(void 0===A)var A=function(a){return B.h&&B.g?(Array.prototype.toJSON&&(a=z(a,B.g.window)),B.g.window.JSON.stringify(a)):JSON.stringify(a)}; z=function(a,c){if(Array.isArray(a))return(new c.Array(...a)).map(b=>z(b,c));if(null!==a&&"object"===typeof a){const b={};Object.entries(a).forEach(([f,h])=>b[f]=z(h,c));return b}return a};void 0===A&&(A=function(a){if(B.h&&B.g)return Array.prototype.toJSON&&(a=z(a,B.g.window)),B.g.window.JSON.stringify(a)});function E(a,c,b){F(window,"addEventListener",a,c,b)}function G(a,c,b){var f={};f[c]=b;a.postMessage(f,"*")} function H(a,c){F(window,"addEventListener","message",function(b){if("string"===typeof b.data)try{var f=JSON.parse(b.data)}catch(h){return!1}else f=b.data;void 0!==f[a]&&c(b.source,f[a])})}function L(){this.name="glance_ssn_info";var a=new M,c=a.h.location.hostname;for(a=a.h;""===c&&a.parent!==a;)c=a.parent.location.hostname,a=a.parent;this.domain=da(c)} L.prototype.get=function(){return this.i()?unescape(document.cookie.replace(new RegExp("(?:^|.*;\\s*)"+escape(this.name).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*"),"$1")):null};L.prototype.j=function(){var a=new Date;a.setDate(a.getDate()-1);document.cookie=escape(this.name)+"=; expires="+a.toGMTString()+"; domain="+this.domain+"; path=/"};L.prototype.i=function(){return(new RegExp("(?:^|;\\s*)"+escape(this.name).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=")).test(document.cookie)}; function N(){this.name="glance_ssn_info"}N.prototype.get=function(){if(!this.i())return null;try{return localStorage.getItem(this.name)}catch(a){return m("Failed to read cookie: "+this.name),null}};N.prototype.j=function(){try{localStorage.removeItem(this.name),localStorage.removeItem(this.name+"_exp")}catch(a){m("Failed to delete cookie: "+this.name)}}; N.prototype.i=function(){var a=null;try{a=localStorage.getItem(this.name+"_exp")}catch(c){return m("Failed to read cookie: "+this.name),!1}if(!a)return!1;a=new Date(a);return a=b[b.length-2].length?b.slice(b.length-3).join("."):b.slice(b.length-2).join(".")}M.prototype.getElementsByTagName=function(a){return F(this.g,"getElementsByTagName",a)}; function R(a,c,b,f){var h=a.g.createElement("script");b&&h.addEventListener("load",b);f&&h.addEventListener("error",f);h.setAttribute("type","text/javascript");h.setAttribute("charset","UTF-8");for(b=0;br++?(h+=t,w+=p,U(f,Math.floor(h),Math.floor(w)),f.h=F(window,"setTimeout",b,20)):U(f,a,c)}void 0!==this.h&&F(window,"clearTimeout",this.h);var f=this,h=parseInt(this.g.style.left),w=parseInt(this.g.style.top);isNaN(h)&&(h=-999);isNaN(w)&&(w=-999);var r=0,t=(a-h)/10,p=(c-w)/10;0===t&&0===p||b()};function V(){this.listeners=this.g={}}V.prototype.add=function(a,c){this.g[a]=this.g[a]||[];this.g[a].push(c)};function W(a,c){if(void 0!==a){var b=b||Object.keys(a);b.forEach(function(f){void 0!==a[f]&&(c[f]=a[f])})}}function X(a){var c={};if(!a)return c;var b=0;for(a=a.attributes;bl.length||E("keydown",e(l[1],parseInt(l[2]),d[g]),!0)}}function c(d){function e(g){return function(l){var u=g.match(/showButton|toggleButton|showTerms/)?"VisitorUI":"Visitor";l.stopPropagation(); l.preventDefault();h(u,g)||(n("button click",u,g),v[u][g]())}}["glance_button","data-glancebutton"].forEach(function(g){for(var l=d.querySelectorAll("["+g+"]"),u=0;l&&uw(e)),"Visitor"===e){var g=document.getElementsByTagName("iframe");for(d=0;d{ca=()=>{d()}});var aa={load:function(d){r(d)},loadScript:function(d,e){R(p,[["src",O+"/"+d+"_"+P+".js"]],e,()=>{w(d)})},setUIReady:ca,_uiready:q,_eventListeners:K,_onload:{}, _origpath:window.location.pathname,groupid:function(){var d=(new Q).get();if(!d)return null;let e;return null==(e=JSON.parse(d).ssnid)?void 0:e.split(".")[0]}()};H("glance_load",function(d,e){d&&(d!==window.parent&&d.parent!==window?m("UNTRUSTED_LOAD_MSG"):(e.s&&r(),e.u&&null!==F(p.g,"getElementById","glance_visitor")&&G(d,"glance_load",{s:!0})))});t&&G(window.parent,"glance_load",{u:!0});window.addEventListener("message",function(d){if("string"!==typeof d.data){if(b().loaded)return!0;d.data.glance_invoke&& r(()=>{b()._handleInvokeMessage(d)})}});E("focus",function(){if(b().loaded)return!0;b().inSession()&&r()});v.Visitor={loaded:!1,inSession:function(){return(new Q).i()},addEventListener:function(d,e){K.add(d,e)},removeEventListener:function(d,e){d=K.g[d];void 0!==d&&(e=d.indexOf(e),0<=e&&d.splice(e,1))}};q=["showButton","toggleButton","showTerms","setStyle"];t||(v.VisitorUI={},q.forEach(function(d){f(d,"VisitorUI")}));q=q.concat(["startSession","setStartParams"]);q.forEach(function(d){f(d,"Visitor")}); v.Loader=aa;t||Y()||!b().inSession()||r();!t&&Y()&&r(null,"XDOM");S(p,function(){document.body&&!ba&&(ba=!0,c(document.body),a(y.v),y.A&&!t&&R(p,[["src",O+"/GlancePresenceVisitor_"+P+".js"]]))});H("forwardevent",function(d,e){n("received forwarded event:",e);if(d.top!==window)m("UNTRUSTED_KEYEVT");else window.GLANCE.Cobrowse[e.namespace][e.funcname]()})}}else k("error",...["ERR_COBROWSE_NOT_SUPP"])} document.getElementById("cobrowsescript")||document.getElementById("glance-cobrowse")?Z():(m("LOADER_PAGE_NOT_READY"),S(new M,Z));}).call(window); //# sourceMappingURL=map.js.map